package com.hoshino.momochi.service;

import com.hoshino.momochi.model.domain.CollectionBlog;
import com.hoshino.momochi.model.domain.Subscribe;

import java.util.List;

public interface SubscribeService {
    /**
     * 获取当前登录用户 的 订阅列表
     *
     * @param uid
     * @return
     */
    List<Subscribe> getUserSubscribeCollection(Long uid);

    /**
     * 订阅收藏夹
     *
     * @param subscribe
     */
    void addSubscribeCollection(Subscribe subscribe);

    /**
     * 取消订阅收藏夹
     *
     * @param subscribe
     */
    void delSubscribeCollection(Subscribe subscribe);

    /**
     * 检验 是否有权限修改 订阅
     *
     * @param subscribe
     * @return
     */
    Long checkHaveSubscribe(Subscribe subscribe);

    /**
     * 检验收藏夹是否属于自己   null 不属于
     *
     * @param subscribe
     * @return
     */
    Long checkHaveCollection(Subscribe subscribe);

    /**
     * 检验收藏夹是否存在
     *
     * @param cid
     * @return
     */
    Long checkCollectionIsLife(Long cid);

    /**
     * 删除 isDelete = 1 的数据
     */
    void delIsDeleteAsTrue();

    /**
     * 获取收藏夹列表
     *
     * @param uid
     * @return
     */
    List<CollectionBlog> getUserSubscribe(Long uid);
}
